Auto merge of #2849 - wezm:publish_dry_run, r=alexcrichton
Add --dry-run to cargo publish
This PR picks up where @JustAPerson left off in https://github.com/rust-lang/cargo/pull/1699. I've updated their changes to apply to current master and added tests, including (I think) a test that checks that the upload doesn't actually occur.
The output is as it was before:

Closes https://github.com/rust-lang/cargo/issues/1332